<?php
// +----------------------------------------------------------------------
// | Demo [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016 http://www.lmx0536.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: limx <715557344@qq.com> <http://www.lmx0536.cn>
// +----------------------------------------------------------------------
// | Date: 2016/11/8 Time: 11:18
// +----------------------------------------------------------------------
namespace MyApp\Controllers;

use MyApp\Models\Student;

class IndexController extends ControllerBase
{

    public function studentAction($id)
    {
        $user = Student::findFirst($id);
        $user->birthday = date("Y-m-d", strtotime($user->birthday));
        $this->view->student = $user;
        return $this->view->render('index', 'index');
    }


}